Extensions to the C++ Language

Contents|Index|Previous|Next
Extensions to the C++ language

The GNU compiler provides extensions to the C++ language (and you can also use most of the C language extensions in your C++ programs). If you want to write code that checks whether these features are available, you can test for the GNU compiler the same way as for C programs: check for a predefined macro, __GNUC__. You can also use __GNUG__ to test specifically for GNU C++ (see Standard predefined macros in The C Preprocessor within GNUPro Compiler Tools).

See the following documentation for more specific discussion regarding extensions to the C++ language family.

- Named return values in C++
- Minimum and maximum operators in C++
- goto and destructors in GNU C++
- Declarations and definitions in one header
- Where's the template?
- Type abstraction using signatures